/* 
* @Author: Jerry-chen
* @Date:   2014-07-01 16:54:16
* @Last Modified by:   Administrator
* @Last Modified time: 2014-10-12 01:23:58
*/
// banner幻灯片JS代码
$(document).ready(function(){
  /*banner打折区域*/


    var dazhe_num=0;

      //自动翻放
      var timeer=setInterval(run, 2000);
       function run(){
        dazhe_num++;
        dazhe_num =(dazhe_num==4)?0:dazhe_num;
        // document.title=dazhe_num;w
        
        $('#banner .dazhes').eq(dazhe_num).fadeIn(300).siblings('#banner .dazhes').fadeOut(300);
         $('#banner .botT p').eq(dazhe_num).css('background','#2BB8AA').siblings().css('background','#CCCCCC');

      } ;
    
    $('#banner').mouseover(function() {
            // alert('fafda')
            //MOUSE放入#banner显示左右键按钮
            clearInterval(timeer);
          
            $('#banner .botL'). stop(). animate({'opacity':'1'});
            $('#banner .botR'). stop().animate({'opacity':'1'});
          });
    //MOUSE移出隐藏
      $('#banner').mouseout(function() {
              //MOUSE放入#banner隐藏左右键按钮
            
              $('#banner .botL'). stop(). animate({'opacity':'0'});
              $('#banner .botR'). stop().animate({'opacity':'0'});
            });
      var timeer=setInterval(run, 2000)
       //当MOUSE点击左边按钮时，当前的显示，其它的隐藏
      
       


     $('#banner .botL').click(function(){
      //控制左边
       dazhe_num--;
      dazhe_num=(dazhe_num==-4)?0:dazhe_num;
       document.title=dazhe_num;
        $('#banner .dazhes').eq(dazhe_num).fadeIn(300).siblings('#banner .dazhes').fadeOut(300);
        //控制小点
        $('#banner .botT p').eq(dazhe_num).css('background','#2BB8AA').siblings().css('background','#CCCCCC');

       

     })


     //控制右边
      $('#banner .botR').click(function(){
       dazhe_num++;
      dazhe_num=(dazhe_num==4)?0:dazhe_num;
      document.title=dazhe_num;
        $('#banner .dazhes').eq(dazhe_num).fadeIn(300).siblings('#banner .dazhes').fadeOut(300);

      $('#banner .botT p').eq(dazhe_num).css('background','#2BB8AA').siblings().css('background','#CCCCCC');

      
     })
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // 个人中心作品的TITLE隐藏和显示
    $('.case-position').hover(function() {
      /* Stuff to do when the mouse enters the element */
     
     $(this).find('p.show-or-hidden-des').stop().animate({height:"65px"},450);

    }, function() {
      /* Stuff to do when the mouse leaves the element */
       $(this).find('p.show-or-hidden-des').stop().animate({height:"0"},450);
    });
  $(function(){
  var $body = $(document.body);;
  var $bottomTools = $('.bottom_tools');
  var $qrTools = $('.qr_tool');
  var qrImg = $('.qr_img');
    $(window).scroll(function () {
      var scrollHeight = $(document).height();
      var scrollTop = $(window).scrollTop();
      var $footerHeight = $('.page-footer').outerHeight(true);
      var $windowHeight = $(window).innerHeight();
      scrollTop > 50 ? $("#scrollUp").fadeIn(200).css("display","block") : $("#scrollUp").fadeOut(200);     
      $bottomTools.css("bottom", scrollHeight - scrollTop - $footerHeight > $windowHeight ? 40 : $windowHeight + scrollTop + $footerHeight + 40 - scrollHeight);
    });
    $('#scrollUp').click(function (e) {
      e.preventDefault();
      $('html,body').animate({ scrollTop:0});
    });
    $qrTools.hover(function () {
      qrImg.fadeIn();
    }, function(){
       qrImg.fadeOut();
    });
});
// JavaScript Document
// 项目JS调用

  


});
    //////////////////////////////////////////////////////////////////////////////////////////////////右侧客服JS


